<?php
/*档案保存完善
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;
cfc('core')->checklogin();
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
//赋值显示
$return=array();

if($_RQ['op']=='main'){
    
    set_html('title','签到就诊');
    //查询时是否有打印日志
    $daytime = mktime(0,0,0,date('m'),date('d'),date('Y'));
    $log = pdo_get('jy_weishop_printer_log',array('uniacid'=>$_SESSION['uniacid'],'print_type'=>11,'mid'=>$_SESSION['uid'],'merchid'=>$_SESSION['onemerchid'],'createtime >'=>$daytime));

    $return['log'] = $log;
    exi($return);
}

if($_RQ['op']=='print4'){
    set_html('title','签到就诊');
    //查询用户档案信息
	$daan = pdo_get('jy_yiliao_body',array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid'],'merchid'=>$_SESSION['onemerchid']));
	$userinfo = pdo_get('jy_yiliao_user',array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid'],'bodyid'=>$daan['id']));
    $daid=$userinfo['id'];
    $logid = pdo_getcolumn('jy_yiliao_qdlinelog',array('uniacid'=>$_SESSION['uniacid'],'merchid'=>$_SESSION['onemerchid'],'store_id'=>$userinfo['storeid'],'createtime'=>date('Y-m-d'),'mid'=>$_SESSION['uid']),'id');
   
    model('jy_weishop/printmsg')->sign_print(1,$daid,$logid,11,$_SESSION['onemerchid']);
    
	exi('打印成功！','success','/hxcg/');
}
?>